const moveDecorator: ClassDecorator = (target: Function) => {
  target.prototype.getPosition = (): { x: number, y: number } => {
    return { x: 100, y: 200 }
  }
}

{
  @moveDecorator
  class Tank {

  }
  @moveDecorator
  class Player {
    // public getPosition(){}
  }

  const tk = new Tank()
  // moveDecorator(Tank) 等同于注入装饰器
  console.log((<any>tk).getPosition());

  const py = new Player()
  console.log((py as any).getPosition());


}